#ifndef FINANCIALWIDGET_H
#define FINANCIALWIDGET_H

#include <QObject>
#include <QWidget>
#include <qcombobox.h>
#include <qdatetimeedit.h>
#include <qpushbutton.h>
#include <QTableWidget>
#include <QtCharts/QChartView>

QT_BEGIN_NAMESPACE
namespace Ui { class FinancialWidget; }
QT_END_NAMESPACE

namespace QtCharts {
    class QChartView;
}

class QTableWidget;
class QComboBox;
class QPushButton;
class QDateEdit;

class FinancialWidget : public QWidget
{
    Q_OBJECT
public:
    explicit FinancialWidget(QWidget *parent = nullptr);
    ~FinancialWidget();

private:
    void setupUI(void);
    void populateStudentComboBox(void);
    void updateChart(void);
    void updatePieChart(void);

private slots:
    void loadFinancialRecords(void);
    void addRecord(void);
    void deleteRecord(void);
    void editRecord(void);

private:
    Ui::FinancialWidget *ui;

    QtCharts::QChartView  * pieChartView      = nullptr;
    QTableWidget    * tableWidget       = nullptr;
    QComboBox       * studentComboBox   = nullptr;
    QPushButton     * addButton         = nullptr;
    QPushButton     * deleteButton      = nullptr;
    QPushButton     * editButton        = nullptr;
    QtCharts::QChartView * chartView         = nullptr;
    QDateEdit       * startDateEdit     = nullptr;
    QDateEdit       * endDateEdit       = nullptr;
};


#endif
